
def test():
    print("hello")

# print(num)   # NameError: name 'num' is not defined

a = 11
# print(a / 0)  # ZeroDivisionError: division by zero

list = [12,34,5,6,8]
print(list[0])  # 12
print(list[4])  # 8
print(list[7])  # IndexError: list index out of range


# 程序中出现异常后,代码会停留在异常的位置,后续的程序不会执行.
print(987)